"""
    使用try...except来处理错误
"""
try:
    file = open("./poem.txt","r")
    str1 = file.read()
    print(str1)
except:
    print("文件读取出错")
finally:
    file.close()